<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="../css/denglu.css"/>
    </head>
    <body>
        
        
        <div class="logo">
            <img src="../img/logo.png"/>
        </div>
        <div class="kang">
            <img src="../img/kang.png"/>
        </div>
        <div class="name">
            <div class="nm">
                <img src="../img/name.png"/>
                <input class="yonghu" type="text" placeholder="Username"/>
            </div>
        </div>
        <div class="psd">
            <div class="ps">
                <img src="../img/pass.png"/>
                <input class="mima" type="text" placeholder="Password"/>
            </div>
        </div>
        <div class="jizhu">
            <div>
                <input type="checkbox"/>记住我
            </div>
        </div>
        
        <div class="dl">
            <div>
                <p>登录</p>
            </div>
        </div>
        
        <div class="zhc">
            <div>
                <p>注册</p>
            </div>
        </div>
        
        
        <script src="../js/flexible.debug.js"></script>
        <script src="../js/flexible_css.debug.js"></script>
        <script src="../js/jquery-1.12.4.min.js"></script>
        
        <script type="text/javascript">
            
            $(function(){
                var yh = $(".yonghu"), mm = $(".mima");
//                var aa = /(\w)[8,*]/;
//                // var yhStr = yh.val();
//                var str = "da.dv.asvd.bsv7!887@9";
//                //RegExp
//                str.replace()
                 $('.dl').on("click", function(){
                    
                    if( yh.val() && mm.val() ){
                        
                        if( yh.val().length < 8 ){
                            alert("用户名不少于8位的数字字母下划线组合");
                        }  else if ( mm.val().length < 8 ) {
                            alert("密码不少于8位的数字字母下划线组合");
                        } else {
                            location.href = "shouye.html";
                        }
                        
                    } else{
                        alert("用户名密码不能为空");
                    }    
                })
                
            })          
               
        </script>

    </body>
</html>